package com.sg.dto.integration.component;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Objects;

/**
 * @desc DataSetsListTwoDto
 * @使用场景
 */
@Data
public class DataSetsListTwoDto extends BaseDto implements Serializable {

    /**
     * 自定义字段
     */
    @ApiModelProperty("自定义字段")
    private String customField;

    /**
     * 通用文本字段
     */
    @ApiModelProperty("通用文本字段")
    private String comTxtField;

    /**
     * 自定义字段2
     */
    @ApiModelProperty("自定义字段2")
    private String customField2;

    /**
     * 自定义字段3
     */
    @ApiModelProperty("自定义字段3")
    private String customField3;

    /**
     * 自定义字段1
     */
    @ApiModelProperty("自定义字段1")
    private String customField1;

    /**
     * 自定义字段6
     */
    @ApiModelProperty("自定义字段6")
    private String customField6;

    /**
     * 自定义字段7
     */
    @ApiModelProperty("自定义字段7")
    private String customField7;

    /**
     * 自定义字段8
     */
    @ApiModelProperty("自定义字段8")
    private String customField8;

    /**
     * 自定义字段5
     */
    @ApiModelProperty("自定义字段5")
    private String customField5;

    /**
     * 自定义字段4
     */
    @ApiModelProperty("自定义字段4")
    private String customField4;

    /**
     * 通用主键ID
     */
    @ApiModelProperty("通用主键ID")
    private String commPrimaryKey;

    /**
     * 通用数值字段3（小数型）
     */
    @ApiModelProperty("通用数值字段3（小数型）")
    private Double comFloatField3;

    /**
     * 通用数值字段4（小数型）
     */
    @ApiModelProperty("通用数值字段4（小数型）")
    private Double comFloatField4;

    /**
     * 通用数值字段5（小数型）
     */
    @ApiModelProperty("通用数值字段5（小数型）")
    private Double comFloatField5;

    /**
     * 文档ID
     */
    @NotNull(message = "文档ID不能为空")
    @ApiModelProperty("文档ID")
    private String unstructuredDataId;

    /**
     * 来源文档关系ID
     */
    @ApiModelProperty("来源文档关系ID")
    private String sourceRelationshipId;

    /**
     * 关系类型编码
     */
    @NotNull(message = "关系类型编码不能为空")
    @ApiModelProperty("关系类型编码")
    private String relationshipType;

    /**
     * 是否是网盘引用关系 TRUE:是 FALSE:否
     */
    @NotNull(message = "是否是网盘引用关系不能为空")
    @ApiModelProperty("是否是网盘引用关系")
    private String isNetworkReference;

    /**
     * 就职记录ID
     */
    @NotNull(message = "就职记录ID不能为空")
    @ApiModelProperty("就职记录ID")
    private String inductionRecordId;

    /**
     * 一级部门ID
     */
    @NotNull(message = "一级部门ID不能为空")
    @ApiModelProperty("一级部门ID")
    private String oneDeptId;

    /**
     * 身份人员ID
     */
    @NotNull(message = "身份人员ID不能为空")
    @ApiModelProperty("身份人员ID")
    private String originalRoleMemberId;

    /**
     * 文档后缀
     */
    @NotNull(message = "文档后缀不能为空")
    @ApiModelProperty("文档后缀")
    private String postfix;

    /**
     * 文件相对路径地址
     */
    @NotNull(message = "文件相对路径地址不能为空")
    @ApiModelProperty("文件相对路径地址")
    private String fileRelativePathAccess;

    /**
     * 指定匹配字段
     */
    @ApiModelProperty("指定匹配字段")
    private String assignMateField;

    /**
     * 文档名称
     */
    @ApiModelProperty("文档名称")
    private String unstructuredDataName;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        DataSetsListTwoDto that = (DataSetsListTwoDto) o;
        return (
                customField == that.customField &&
                        comTxtField == that.comTxtField &&
                        customField2 == that.customField2 &&
                        customField3 == that.customField3 &&
                        customField1 == that.customField1 &&
                        customField6 == that.customField6 &&
                        customField7 == that.customField7 &&
                        customField8 == that.customField8 &&
                        customField5 == that.customField5 &&
                        customField4 == that.customField4 &&
                        commPrimaryKey == that.commPrimaryKey &&
                        comFloatField3 == that.comFloatField3 &&
                        comFloatField4 == that.comFloatField4 &&
                        comFloatField5 == that.comFloatField5 &&
                        unstructuredDataId == that.unstructuredDataId &&
                        sourceRelationshipId == that.sourceRelationshipId &&
                        relationshipType == that.relationshipType &&
                        isNetworkReference == that.isNetworkReference &&
                        inductionRecordId == that.inductionRecordId &&
                        oneDeptId == that.oneDeptId &&
                        originalRoleMemberId == that.originalRoleMemberId &&
                        postfix == that.postfix &&
                        fileRelativePathAccess == that.fileRelativePathAccess &&
                        assignMateField == that.assignMateField &&
                        unstructuredDataName == that.unstructuredDataName
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                super.hashCode(),
                customField,
                comTxtField,
                customField2,
                customField3,
                customField1,
                customField6,
                customField7,
                customField8,
                customField5,
                customField4,
                commPrimaryKey,
                comFloatField3,
                comFloatField4,
                comFloatField5,
                unstructuredDataId,
                sourceRelationshipId,
                relationshipType,
                isNetworkReference,
                inductionRecordId,
                oneDeptId,
                originalRoleMemberId,
                postfix,
                fileRelativePathAccess,
                assignMateField,
                unstructuredDataName
        );
    }

}
